from rest_framework import serializers
from goods.models import GoodCategoryVisit

# 商品访问量，序列化器
class GoodVisitCountSerializer(serializers.ModelSerializer):
    category = serializers.StringRelatedField(read_only=True)
    class Meta:
        model = GoodCategoryVisit
        fields = "__all__"